/**
 * node 作成用
 * @param tagName
 * @param classNames
 * @param attributes
 * @returns {*}
 */
export function make (tagName, classNames = null, attributes = {}) {
  const el = document.createElement(tagName)

  if (Array.isArray(classNames)) {
    el.classList.add(...classNames)
  } else if (classNames) {
    el.classList.add(classNames)
  }

  for (const attrName in attributes) {
    el[attrName] = attributes[attrName]
  }
  return el
}
